package tqq.action.state;

public class Context {
	private State state;
	
	public  Context(State state){
		this.state = state ;
	}
	
	public void active(){
		if(state.getState().equals("hunger")){
			state.eat();
		}else if(state.getState().equals("sleepy")){
			state.sleep();
		}else{
			System.err.println("未定义状态");
		}
		
	}
}
